package book;

public class BookList {
    private Book[] books;
    private int useSize;
    private static final int MAX_SIZE = 4;

    public BookList() {
        books = new Book[MAX_SIZE];
        books[0] = new Book("西游记", "吴承恩", 19.0, "小说");
        books[1] = new Book("水浒传", "施耐庵", 15.0, "小说");
        books[2] = new Book("三国演义", "罗贯中", 10.0, "小说");
        this.useSize = 3;
    }
    public int getMaxSize() {
        return MAX_SIZE;
    }
    public void setBook(int index, Book book) {
        books[index] = book;
    }
    public Book getBook(int index) {
        return books[index];
    }
    public int getUseSize() {
        return useSize;
    }

    public void setUseSize(int useSize) {
        this.useSize = useSize;
    }
}
